#!/bin/bash
#2020年7月22日20:59:23
#auto config tomcat web
#by author www.jfedu.net
########################
#Install JAVA JDK
ls -l jdk1.8.0_131.tar.gz 
tar -xzvf jdk1.8.0_131.tar.gz
mkdir -p /usr/java/
\mv jdk1.8.0_131 /usr/java/
ls -l /usr/java/jdk1.8.0_131/
/usr/java/jdk1.8.0_131/bin/java -version
cat>>/etc/profile<<EOF
export JAVA_HOME=/usr/java/jdk1.8.0_131
export CLASSPATH=\$CLASSPATH:\$JAVA_HOME/lib:\$JAVA_HOME/jre/lib
EOF
source /etc/profile

#Install Tomcat WEB
ls -l apache-tomcat-8.0.50.tar.gz
tar -xzvf apache-tomcat-8.0.50.tar.gz
mkdir -p /usr/local/tomcat_v1.jf.com/
\mv apache-tomcat-8.0.50/* /usr/local/tomcat_v1.jf.com/
ls -l /usr/local/tomcat_v1.jf.com/
/usr/local/tomcat_v1.jf.com/bin/startup.sh
ps -ef|grep "v1.jf.com"
sleep 10 
netstat -tnlp|grep -aiwE "8005|8080|8009"
setenforce 0
systemctl stop firewalld.service
service iptables stop
